<%-- 
    Document   : create
    Created on : 16.10.2010, 12:51:26
    Author     : nico
--%>

<%@page import="se.bth.ke.firstfriend.util.Util"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="http://nixis.de/jsp/tags/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
    request.setAttribute("TODO_PRIORITY_MAP", Util.TODO_PRIORITY_MAP);
%>
<html>
    <head></head>
    <body>
        <h1>Add as todo</h1>
        <p>Please specify some additional information for the todo</p>
        
        <form method="post" class="ajax" action="<u:url value="/article/${it.id}/todo" />">
            <fieldset>
                <label>Deadline</label> <input type="text" name="deadline" size="10"/> (YYYY/MM/DD)
            </fieldset>
            <fieldset>
                <label>Priority</label>
                <c:forEach items="${TODO_PRIORITY_MAP}" var="entry">
                    <input name="priority" value="${entry.key}" type="radio" class="task-priority" title="${entry.value}"/>
                </c:forEach>
            </fieldset>
            <fieldset>
                <input type="submit" value="ok"/>
            </fieldset>
        </form>

        <script type="text/javascript">
            $("#add-todo-dialog .task-priority")
               .rating({
                   required: true
               });
        </script>
    </body>
</html>